package com.neutech.service.impl;
import com.neutech.mapper.PatientMapper;
import com.neutech.service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public  class PatientServiceImpl implements PatientService {
    @Autowired
    private PatientMapper patientMapper;
    @Override
    public List<Map<String, Object>> queryPatient() {
        List<Map<String, Object>> list = patientMapper.queryPatientList(0);
        return list;
    }
    @Override
    public void insertPatient(Map map){
        Integer a = patientMapper.addPatient(map);

    }
    public void updataPatient(Map map){
        patientMapper.updataPatientById(map);
    }
    public void deletePatient(Map map){
       // doctorMapper.delDoctorById(map);
//        System.out.println(map.get("docid"));
//        System.out.println("kanzheli");
        Integer patid= Integer.valueOf(map.get("patid").toString());
        patientMapper.delPatientById(patid);
    }
}
